package com.legendshop.oa.model ;

import com.legendshop.dao.persistence.*;
import com.legendshop.dao.support.GenericEntity;

import java.util.Date;

/**
 *管理员用户表
 */
@Entity
@Table(name = "ls_admin_user")
public class AdminUser implements GenericEntity<Long> {

	private static final long serialVersionUID = -4380038386301964667L;

	/** 用户ID */
	private Long id; 
		
	/** 名称 */
	private String name; 
		
	/** 密码 */
	private String password; 
		
	/** 状态 */
	private String enabled; 
		
	/** 注释 */
	private String note; 
		
	/** 部门ID */
	private Long deptId;

	/** 部门名称 **/
	private String deptName;
	
	/** 联系手机 */
	private String mobile;
	
	/** 真实名字 */
	private String realName;
	
	/** 身份证号 */
	private String idCardNum;
	
	/** 住址 */
	private String addr;
	
	/** 入职时间 */
	private String hireDate;
	
	/** 记录时间 */
	private Date recDate;
	
	/** 更新时间 */
	private Date modifyDate;
	
	private Long[] roleId;
	
	private Date activeTime;

	/** 用户是否必须要修改密码 **/
	private Integer changePass = 1;//1为初次登陆，需要修改密码，之后值改为0
	
	

	private String leader; //上级

	private String leaderName; //上级名称

	
	
	private String position; //职位

	private String sex;//性别
	
	private Integer needDailyLog; //是否需要填写日志

	private Date passChangeDate; //密码修改时间

	//一共消耗多少工时
	private Double consumed;
	
	public AdminUser() {
    }
		
	@Id
	@Column(name = "id")
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "generator")
	@TableGenerator(name = "generator", pkColumnValue = "ADMIN_USER_SEQ")
	public Long  getId(){
		return id;
	} 
		
	public void setId(Long id){
			this.id = id;
		}
		
    @Column(name = "name")
	public String  getName(){
		return name;
	} 
		
	public void setName(String name){
			this.name = name;
		}
		
    @Column(name = "password")
	public String  getPassword(){
		return password;
	} 
		
	public void setPassword(String password){
			this.password = password;
		}
		
    @Column(name = "enabled")
	public String  getEnabled(){
		return enabled;
	} 
		
	public void setEnabled(String enabled){
			this.enabled = enabled;
		}
		
    @Column(name = "note")
	public String  getNote(){
		return note;
	} 
		
	public void setNote(String note){
			this.note = note;
		}
		
    @Column(name = "dept_id")
	public Long  getDeptId(){
		return deptId;
	} 
		
	public void setDeptId(Long deptId){
			this.deptId = deptId;
		}

    @Column(name = "mobile")
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

    @Column(name = "real_name")
	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

    @Column(name = "id_card_num")
	public String getIdCardNum() {
		return idCardNum;
	}

	public void setIdCardNum(String idCardNum) {
		this.idCardNum = idCardNum;
	}

    @Column(name = "addr")
	public String getAddr() {
		return addr;
	}

	public void setAddr(String addr) {
		this.addr = addr;
	}

    @Column(name = "hire_date")
	public String getHireDate() {
		return hireDate;
	}

	public void setHireDate(String hireDate) {
		this.hireDate = hireDate;
	}

    @Column(name = "rec_date")
	public Date getRecDate() {
		return recDate;
	}

	public void setRecDate(Date recDate) {
		this.recDate = recDate;
	}

    @Column(name = "modify_date")
	public Date getModifyDate() {
		return modifyDate;
	}

	public void setModifyDate(Date modifyDate) {
		this.modifyDate = modifyDate;
	}

	@Transient
	public Long[] getRoleId() {
		return roleId;
	}

	public void setRoleId(Long[] roleId) {
		this.roleId = roleId;
	}

    @Column(name = "active_time")
	public Date getActiveTime() {
		return activeTime;
	}

	public void setActiveTime(Date activeTime) {
		this.activeTime = activeTime;
	}

	@Column(name = "change_pass")
	public Integer getChangePass() {
		return changePass;
	}

	public void setChangePass(Integer changePass) {
		this.changePass = changePass;
	}

	@Column(name = "leader")
	public String getLeader() {
		return leader;
	}

	public void setLeader(String leader) {
		this.leader = leader;
	}

	@Column(name = "position")
	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	@Column(name = "sex")
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	@Transient
	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	@Transient
	public String getLeaderName() {
		return leaderName;
	}

	public void setLeaderName(String leaderName) {
		this.leaderName = leaderName;
	}

	@Column(name = "need_daily_log")
	public Integer getNeedDailyLog() {
		return needDailyLog;
	}

	public void setNeedDailyLog(Integer needDailyLog) {
		this.needDailyLog = needDailyLog;
	}

	@Column(name = "pass_change_date")
	public Date getPassChangeDate() {
		return passChangeDate;
	}

	public void setPassChangeDate(Date passChangeDate) {
		this.passChangeDate = passChangeDate;
	}

	@Transient
	public Double getConsumed() {
		return consumed;
	}

	public void setConsumed(Double consumed) {
		this.consumed = consumed;
	}

}
